package com.lion.ball.modules.admin.web.model.result;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author Chris Chan
 * Create On 2025/8/26 下午5:43
 * Use for: 购物车 参数
 * Explain:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "模拟用户列表项")
public class MockUserItemResult implements Serializable {
    private static final long serialVersionUID = 1L;

    /*
    createTime: string
  email: string
  id: number
  phone: string
  roles: string
  status: boolean
  username: string
     */
    @Schema(description = "创建时间", example = "2025-08-26 15:00:00")
    private String createTime;
    @Schema(description = "邮箱", example = "123@qq.com")
    private String email;
    @Schema(description = "主键", example = "1")
    private Long id;
    @Schema(description = "手机号", example = "13800000000")
    private String phone;
    @Schema(description = "角色", example = "admin")
    private String roles;
    @Schema(description = "状态", example = "true")
    private boolean status;
    @Schema(description = "用户名", example = "admin")
    private String username;


    public static MockUserItemResult create(Long id, String username, String phone, String email, String roles, boolean status, String createTime) {
        return new MockUserItemResult(createTime, email, id, phone, roles, status, username);
    }

    public static MockUserItemResult of(Long id, String username, String phone, String email, String roles, boolean status, String createTime) {
        return new MockUserItemResult(createTime, email, id, phone, roles, status, username);
    }
}
